package com.qidian.tcba.admin.api.controller;


import com.qidian.tcba.admin.model.dto.recordProcess.RecordProcessHistoryDTO;
import com.qidian.tcba.admin.service.ParkLotRecordProcessHistoryService;
import com.qidian.tcba.admin.service.ParkLotRecordTaskService;
import com.qidian.tcba.utils.result.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 停车场备案流程履历表 前端控制器
 * </p>
 *
 * @author 冯永龙
 * @since 2021-07-06
 */
@RestController
@RequestMapping("/parkLotRecordProcessHistory")
@Api(tags ="流程履历")
public class ParkLotRecordProcessHistoryController {

    @Autowired
    private ParkLotRecordProcessHistoryService parkLotRecordProcessHistoryService;



    @ApiOperation("获取流程履历列表")
    @GetMapping("/getParkLotRecordHistoryAllList/{taskId}/{type}")
    public JsonResult getParkLotRecordHistoryAllList(@PathVariable("taskId") int taskId,@PathVariable("type") int type){
        List<RecordProcessHistoryDTO> parkLotRecordHistoryAllList = parkLotRecordProcessHistoryService.getParkLotRecordHistoryAllList(taskId, type);
        return JsonResult.success().data("row",parkLotRecordHistoryAllList);
    }

}

